<%@ Page Title="Projects" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" AutoEventWireup="true" 
	Inherits="System.Web.Mvc.ViewPage<IEnumerable<AgileBoard.Core.Project>>" %>
<%@ Import Namespace="AgileBoard.Core" %>
<%@ Import Namespace="AgileBoard.Web.Controllers" %>
 

<asp:Content ContentPlaceHolderID="MainContentPlaceHolder" runat="server">
    <h1>Projects</h1>

    <% if (ViewContext.TempData[ControllerEnums.GlobalViewDataProperty.PageMessage.ToString()] != null) { %>
        <p id="pageMessage"><%= ViewContext.TempData[ControllerEnums.GlobalViewDataProperty.PageMessage.ToString()]%></p>
    <% } %>

    <ol>
		<% foreach (Project project in ViewData.Model) { %>
				<li>
                    <%=Html.ActionLink<ProjectsController>(c => c.Select(project.Id), project.Name)%>
                    iteration <%=project.Iterations.Count%>
                </li>
		<%} %>
    </ol>

    <p>
    <br />
    <%= Html.ActionLink<ProjectsController>(c => c.Create(), "Create New Project") %></p>
</asp:Content>
